package service;

import pojo.User;

import java.sql.SQLException;
import java.util.ArrayList;

public interface UserService {
    /**
     * 校验用户各信息的注册
     *
     * @param user1
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    boolean checkUserLogin(User user1) throws SQLException, ClassNotFoundException;

    /**
     * 用户登录
     *
     * @param usename
     * @param password
     * @return
     * @throws SQLException
     */
    boolean userLogin(String usename, String password) throws SQLException;

    /**
     * 用户注册
     *
     * @param user
     * @return
     * @throws SQLException
     */
    boolean userRegist(User user) throws SQLException;

    /**
     * 查找用户信息
     *
     * @param uid
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    User findUser(Integer uid) throws SQLException, ClassNotFoundException;

    /**
     * 修改用户信息
     *
     * @param user
     * @return
     * @throws SQLException
     * @throws IllegalAccessException
     */
    boolean updateUserInformation(User user) throws SQLException, IllegalAccessException;

    /**
     * 查找用户信息
     *
     * @param usename
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    User findUserByUsername(String usename) throws SQLException, ClassNotFoundException;

    /**
     * 获取区域用户信息
     *
     * @param type
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    ArrayList<User> areaUserList(String type) throws SQLException, ClassNotFoundException;
}
